package cn.ld.fj.entity;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * Created by lixiangjun on 2017/8/1.
 */

@Entity
@Table(name = "ES_MEAL_ORDER")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class MealOrder extends IdEntity {

    private Long deskShopId;   //座位
    private Long userId;      //创建者

    private String extra;     //其他信息

    private int personNum;    //几个人

    private int orderType;    //1 就餐中   2 已结账   3欠账

    private float totalMoney;    //总价钱


    private float disCountMoney;  //折扣后的价

    private Date createDate;

    private Integer payType; //支付类型  1 现金  2微信  3支付宝  4VIP卡支付

    private float realMoney;  //实收


    private String cardNum;

    @Transient
    public String getCardNum() {
        return cardNum;
    }

    public void setCardNum(String cardNum) {
        this.cardNum = cardNum;
    }

    public float getRealMoney() {
        return realMoney;
    }

    public void setRealMoney(float realMoney) {
        this.realMoney = realMoney;
    }

    private Integer deskNum;  //非持久化字段

    private String userName;  //非持久化字段


    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    @Transient
    public Integer getDeskNum() {
        return deskNum;
    }

    public void setDeskNum(Integer deskNum) {
        this.deskNum = deskNum;
    }

    @Transient
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public float getDisCountMoney() {
        return disCountMoney;
    }

    public void setDisCountMoney(float disCountMoney) {
        this.disCountMoney = disCountMoney;
    }

    public Long getDeskShopId() {
        return deskShopId;
    }

    public void setDeskShopId(Long deskShopId) {
        this.deskShopId = deskShopId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public int getPersonNum() {
        return personNum;
    }

    public void setPersonNum(int personNum) {
        this.personNum = personNum;
    }

    public int getOrderType() {
        return orderType;
    }

    public void setOrderType(int orderType) {
        this.orderType = orderType;
    }

    public float getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(float totalMoney) {
        this.totalMoney = totalMoney;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
}
